<script setup>
	import {
		onLaunch
	} from '@dcloudio/uni-app'
	import {
		useAppInfoStore
	} from '@/stores/appInfo'
	const appInfoStore = useAppInfoStore()

	const saveDeviceInfo = (e) => {
		// console.log(e);
		let statusBar = e.statusBarHeight
		const navBarHeight = 45
		const deviceId = e.deviceId
		const deviceBrand = e.deviceType
		appInfoStore.setInfo(
			statusBar,
			navBarHeight,
			e.screenWidth,
			e.screenHeight,
			deviceId,
			deviceBrand,
			e.appVersion,
			e.platform
		)
	}
	onLaunch(() => {
		uni.getSystemInfo({
			success: function(res) {
				saveDeviceInfo(res)
			}
		})
	})
</script>

<style>
	/*每个页面公共css */
</style>